package cn.school.entity;

//写一个SubjectDao,实现必要的CRUD功能
public class Subject {
	private int id;
	private String subjectname;
	private int gradeid;
	private int classhour;

	public Subject() {
	}

	public Subject(String subjectName, int gradeId, int classHour) {
		super();
		this.subjectname = subjectName;
		this.gradeid = gradeId;
		this.classhour = classHour;
	}

	public Subject(int id, String subjectName, int gradeId, int classHour) {
		super();
		this.id = id;
		this.subjectname = subjectName;
		this.gradeid = gradeId;
		this.classhour = classHour;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getSubjectName() {
		return subjectname;
	}

	public void setSubjectName(String subjectName) {
		this.subjectname = subjectName;
	}

	public int getGradeId() {
		return gradeid;
	}

	public void setGradeId(int gradeId) {
		this.gradeid = gradeId;
	}

	public int getClassHour() {
		return classhour;
	}

	public void setClassHour(int classHour) {
		this.classhour = classHour;
	}

	@Override
	public String toString() {
		return "Subject [id=" + id + ", subjectName=" + subjectname + ", gradeId=" + gradeid + ", classHour="
				+ classhour + "]";
	}

}
